home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / pc_board / pcbss30.zip / NEWUSER.ZIP / NEWUSER.DEF < prev   
Text File  |  1992-11-23  |  31KB  |  778 lines

  1.  
  2. ; The next line includes the file SS.CFG (located in the home path of
  3. ; SS.EXE). This file can contain anything that you want included or
  4. ; processed for each file that you include it in. For example, it can
  5. ; contain field definitions that are considered global to all scripts that
  6. ; are run. The SS.CFG as provided is setup to define fields that contain
  7. ; directory references for use by the sample scripts. You need to edit the
  8. ; SS.CFG file (in the same directory as SS.EXE) before running any of the
  9. ; the sample scripts.
  10. ;
  11. ; NOTE: If you do not store your SS.CFG file in the same directory as
  12. ;       SS.EXE, or if you call this file something else, you may specify the
  13. ;       path directly and not use the "@ss_cfig@" macro. You may also not
  14. ;       include the file at all if you have no need for it's contents.
  15. ;
  16.   include @ss_cfig@
  17.  
  18. ; Include the FIELDS and FORMAT definitions for use with the caller history
  19. ; file. This is used to store the information that the caller answers in
  20. ; this script. The file is a dBase III+ format file, and the record key is
  21. ; the caller name.
  22. ;
  23.   include @%SS_DEF_DIR "\callhist.fil"
  24.  
  25. ;
  26. ; Define the fields needed for this script
  27. ;
  28.   FIELDS
  29.   ;----------------------------------------------------------------------
  30.   ; Name        Type Len Prec Min Mask                    Default Value
  31.   ;----------------------------------------------------------------------
  32.     Option        C    1   0    1  *
  33.     AnyKey        C    1   0    0  *
  34.     YesOrNo       C    1   0    1  Y
  35.     isLong        C    1   0    1  Y  N
  36.     wasAbort      C    1   0    1  Y  N
  37.     xphone        C   13   0   13  (999)999-9999
  38.     Cmnt1         C   55   0    0  *
  39.     Cmnt2         C   55   0    0  *
  40.     Cmnt3         C   55   0    0  *
  41.     area          C    5   0    0  *
  42.     exch          C    5   0    0  *
  43.     pnum          C    5   0    0  *
  44.     modem         C   60   0    0  * "ATDT "
  45.     msgSUBJ       C   30   0    0  *
  46.     msgTITL       C   60   0    0  *
  47.  
  48.     wasnew        C    1   0    0  N N
  49.     cdate         C    8   0    0  *
  50.     ctime         C    8   0    0  *
  51.     pw            C   12   0    0  PPPPPPPPPPPP
  52.     pw_cnt        N    1   0    0  9 0
  53.     topl          C    1   0    0  * "┌"
  54.     topr          C    1   0    0  * "┐"
  55.     botl          C    1   0    0  * "└"
  56.     botr          C    1   0    0  * "┘"
  57.     up            C    1   0    0  * "│"
  58.     mid           C   77   0    0  * "─────────────────────────────────────────────────────────────────────────────"
  59.     hline         C   79   0    0  * "───────────────────────────────────────────────────────────────────────────────"
  60.  
  61.     kbStfFile     C   78   0    0  *
  62.     ssTxtOut      C    1   0    0  Y
  63.     ssTxtFile     C   48   0    0  *
  64.     ssCallLog     C    1   0    0  Y
  65.     ssCallBack    C    1   0    0  Y
  66.     ssLongDist    C    1   0    0  Y
  67.     ssSubScribe   C    1   0    0  Y
  68.  
  69.   FIELDS
  70.  
  71. ;
  72. ;--------------------------------------------------------------------------
  73. ;--------------------------------------------------------------------------
  74. ;
  75.   set kbStfFile     @%PCBDRIVE @%PCBDIR "\pcbstuff.kbd"
  76.   set ssTxtOut      Y
  77.   set ssTxtFile     @ss_path@ "log\newcall.log"
  78.   set ssCallLog     Y
  79.   set ssCallBack    Y
  80.   set ssLongDist    N
  81.   set ssSubScribe   Y
  82.  
  83.   beeps off                                   ;
  84.   flush_kb                                    ;
  85.   color     bright cyan black                 ;set crt colors
  86.   entry_min_attr  bright red black            ;
  87.   entry_max_attr  bright blue black           ;
  88.   entry_ans_attr  bright yellow black         ;
  89.  
  90.   ;
  91.   ; open caller history file
  92.   ;
  93.   open 1 ssLogDir CALLHIST                    ;
  94.   if @file_stat@ != "*OK*"                    ;chk for err
  95.     create 1 HistFmt ssLogDir CALLHIST        ;env var pts to dir
  96.     if @file_stat@ != "*OK*"                  ;chk for err
  97.       text  "CANNOT CREATE CALLHIST FILE"     ;
  98.       goto AbortJob                           ;
  99.     endif                                     ;
  100.   endif                                       ;
  101.  
  102.   if ssCallLog == "Y"
  103.     log_msg   @user@ " accessed CallBackDoor"
  104.   endif
  105.  
  106.   ;
  107.   ; check the caller history file to see if this caller has been
  108.   ; in this door before.
  109.   ;
  110.   read 1 HistFmt                  ;read caller hist file for this caller
  111.   if @file_stat@ == "*OK*"            ;was it found?
  112.     set wasnew N
  113.     gosub Listit                      ; yes; display and prompt
  114.   else
  115.     set wasnew Y
  116.     gosub NewCaller
  117.   endif                               ;not found, new caller
  118.  
  119. ;---------------------------------------------------------------------------
  120. ;---------------------------------------------------------------------------
  121. ; main prompt line
  122. ;---------------------------------------------------------------------------
  123. ;---------------------------------------------------------------------------
  124. Prompt:
  125.   display 17 1 "@X0B" hline "@X07"
  126.   set     Option
  127.   setmask Option "<ALEXalex>"
  128.   accept 18 1  "@X0ECommand: @X0BA@X03ccept, @X0BL@X03ist, @X0BE@X03dit " Option
  129.   ucase   Option
  130.   switch  Option
  131.     case  "A"
  132.       goto CallBack
  133.     case  "L"
  134.       gosub Listit                      ; yes; display and prompt
  135.       break
  136.     case  "E"
  137.       newline 2
  138.       gosub GetData
  139.       break
  140.     case  "X"
  141.       goto AbortJob                     ; quit script
  142.   endswitch
  143.   goto Prompt
  144.  
  145. ;---------------------------------------------------------------------------
  146. ; Call Back Routine
  147. ;---------------------------------------------------------------------------
  148. CallBack:
  149.   if ssCallBack != "Y"
  150.     goto SubScribe
  151.   endif
  152. ;  if @port@ == 0
  153. ;    goto SubScribe
  154. ;  endif
  155.   gosub Header
  156.   display  5 5 "Which number should we call you back at?"
  157.   display  6 5 ""
  158.   display  7 5 "1.. @X0B" Phone
  159.   display  8 5 "2.. @X0B" Fax
  160.   display  9 5 "3.. @X0BEnter a different number now"
  161.   display 10 5 ""
  162.   display 11 5 "    <ESC> aborts"
  163.   gosub   Footer
  164.   esc_chk ON                                      ;turn escape checking on
  165.   set     Option                                  ;set var to null
  166.   setmask Option "<123>"                          ;set entry mask
  167.   esc_to  CBFail                                  ;set esc latch
  168.   accept  14 5 "     @X0ESelect:@X03 " Option     ;get caller input
  169.   esc_to                                          ;reset esc latch
  170.   switch  Option                                  ;test caller entry
  171.     case  "1"                                     ;
  172.       set   Num2Call Phone                        ;
  173.       break                                       ;
  174.     case  "2"                                     ;
  175.       set   Num2Call Fax                          ;
  176.       break                                       ;
  177.     case  "3"                                     ;
  178.       set     xphone                              ;
  179.       esc_to  CallBack                            ;
  180.       accept  14 5 "@X0EEnter number to call:@X03 " xphone  ;
  181.       esc_to                                      ;reset esc latch
  182.       set   Num2Call xphone                       ;
  183.       break                                       ;
  184.   endswitch                                       ;
  185.  
  186.   ;
  187.   ; Check phone number and ask caller if it's ok
  188.   ;
  189.   parsephone  Num2Call area exch pnum             ;bust up phone num
  190.   trim  area exch pnum                            ;trim space from flds
  191.   if exch == "000"                                ;chk for fake #'s
  192.     goto InvalidPhoneNum                          ;
  193.   endif                                           ;
  194.   if pnum == "0000"                               ;chk for fake #'s
  195.     goto InvalidPhoneNum                          ;
  196.   endif                                           ;
  197.   switch  area                                    ;chk area code
  198.     case  ""                                      ;if null,
  199.     case  "813"                                   ; or our are code
  200.       set isLong 'N'                              ; then not LD
  201.       set Num2Call exch "-" pnum                  ; build call number
  202.       break                                       ;chk 'exch' now (fall thru)
  203.     case  "800"                                   ;handle 800 #'s
  204.       set isLong 'N'                              ; not LD
  205.       set Num2Call "1(" area ")" exch "-" pnum    ; build call number
  206.       goto  IsPhoneNumOk                          ;
  207.    dcase                                          ;default case
  208.       set isLong 'Y'                              ; assume any other AC is LD
  209.       set Num2Call "1(" area ")" exch "-" pnum    ; build call number
  210.       goto  IsPhoneNumOk                          ;
  211.   endswitch
  212.  
  213.   switch  exch                                    ;chk exchange code for
  214.     case  "858"                                   ; #'s that are in our
  215.     case  "859"                                   ; area code but still
  216.     case  "754"                                   ; long distance.
  217.     case  "756"                                   ; add lines as needed.
  218.       set isLong 'Y'                              ;set ld flag
  219.       set Num2Call "1-" exch "-" pnum             ; build call number
  220.   endswitch
  221.  
  222. ;
  223. ; ask caller if the phone number we just built is ok
  224. ;
  225. IsPhoneNumOk:
  226.   if ssLongDist == 'N'    ;if not allow LD
  227.     if isLong == 'Y'      ; and it's a LD #
  228.       goto NoLD           ; err out
  229.     endif                 ;
  230.   endif                   ;
  231.  
  232.   gosub Header
  233.   display  5 5 "We are about to call you back at the following number:"
  234.   display  6 5 ""
  235.   display  7 5 "         " Num2Call
  236.   gosub Footer
  237.   set   YesOrNo                             ;set var to null
  238.   esc_to CallBack                           ;set esc latch
  239.   accept 10 5 "    Is this correct?: " YesOrNo   ;get caller input
  240.   esc_to                                    ;reset esc latch
  241.   if YesOrNo == "N"                         ;if caller said NO
  242.     goto CallBack                           ; go back to prev prompt
  243.   endif                                     ;
  244.  
  245.   write 1 HistFmt                           ;write
  246.   update_user_record                        ;update the user record with new
  247.   gosub Header
  248.   display  5 5 "Call back procedure started."
  249.   display  6 5 ""
  250.   display  7 5 "Your modem will ring in a few seconds (10 to 30). When you see"
  251.   display  8 5 "the word RING on your screen, type 'ATA'<ENTER> and you will"
  252.   display  9 5 "be re-connected to QExchange."
  253.   display 10 5 ""
  254.   display 11 5 "NOTE: Most modems will support auto answer. To set this option"
  255.   display 12 5 "      enter 'ATS0=1'<ENTER>. This works for most modems. If you"
  256.   display 13 5 "      elect to use this feature of your modem, you do not need"
  257.   display 14 5 "      to use the ATA method above."
  258.   gosub Footer
  259.  
  260.   ;
  261.   ; start the callback proc now...
  262.   ;
  263.   esc_chk OFF                         ;turn escape checking off
  264.   set modem modem Num2Call
  265.   callbacK  45 modem
  266.   if @shell_stat@ == 0
  267.     goto CBFail
  268.   endif
  269.  
  270. ;
  271. ; callback went ok - get the caller password to verify who it is
  272. ;
  273.   set pw_cnt 1
  274. GetPW:
  275.   gosub Header
  276.   display  5 5 "Please enter your password below"
  277.   display  6 5 "Attempt Number:" pw_cnt
  278.   if pw_cnt == 3
  279.     display 7 5 "This is your last try!"
  280.   endif
  281.   gosub Footer
  282.   set   pw
  283.   accept  10 5 "Password:" pw
  284.   trim  pw
  285.   ucase pw
  286.   if pw != @password@
  287.     if pw_cnt == 3
  288.       goto pwFail
  289.     endif
  290.     add pw_cnt pw_cnt 1
  291.     goto GetPW
  292.   endif
  293.  
  294.   ;
  295.   ; password was entered ok. let 'em in....
  296.   ;
  297.   goto SubScribe
  298.  
  299. ;---------------------------------------------------------------------------
  300. ;---------------------------------------------------------------------------
  301. SubScribe:
  302.   if ssSubScribe != "Y"
  303.     goto JobDone
  304.   endif
  305.   gosub   Header
  306.   display  5 5 "Which Credit Card will you be using?"
  307.   display  6 5 ""
  308.   display  7 5 "V.. @X0B Visa"
  309.   display  8 5 "M.. @X0B MasterCard"
  310.   display  9 5 "D.. @X0B Discover"
  311.   display 10 5 "A.. @X0B American Express"
  312.   display 11 5 ""
  313.   display 12 5 "    <ESC> aborts"
  314.   gosub   Footer
  315.   set     Option                                  ;set var to null
  316.   setmask Option "<VMDAvmda>"                     ;set entry mask
  317.   esc_chk ON                                      ;turn escape checking on
  318.   esc_to  SubScribeFail                           ;set esc latch
  319.   accept  15 5 "     @X0ESelect:@X03 " Option     ;get caller input
  320.   esc_to                                          ;reset esc latch
  321.   esc_chk OFF                                     ;turn escape checking OFF
  322.   ucase   Option
  323.   set     CardType Option
  324.   switch  CardType                              ;
  325.     case  "A"                                     ;
  326.       setmask CardNum "9999 999999 99999"       ;amex
  327.       break                                       ;
  328.     case  "V"                                     ;
  329.       setmask CardNum "9999 9999 9999 9999"     ;visa
  330.       break                                       ;
  331.     case  "M"                                     ;
  332.       setmask CardNum "9999 9999 9999"          ;mastercard ???
  333.       break                                       ;
  334.     case  "D"                                     ;
  335.       setmask CardNum "9999 99 999999 9999"     ;discover   ???
  336.       break                                       ;
  337.    dcase
  338.     goto SubScribe
  339.   endswitch                                       ;
  340.  
  341. ;---------------------------------------------------------------------------
  342. GetCardNum:
  343.   gosub   Header
  344.   display  5 5 "Enter your card number now"
  345.   gosub   Footer
  346.   set     CardNum                               ;set var to null
  347.   accept   8 5 "@X0ECard Number:@X03 " CardNum  ;get caller input
  348.   trim    CardNum
  349.   if CardNum == ""
  350.     goto SubScribe
  351.   endif
  352.   validcreditcard CardNum Option
  353.   if Option == ""
  354.     goto GetCardNum
  355.   endif
  356.   switch  Option                                  ;convert to letter code
  357.     case  "3"                                     ;
  358.       set Option "A"                              ;amex
  359.       break                                       ;
  360.     case  "4"                                     ;
  361.       set Option "V"                              ;visa
  362.       break                                       ;
  363.     case  "5"                                     ;
  364.       set Option "M"                              ;mastercard
  365.       break                                       ;
  366.     case  "6"                                     ;
  367.       set Option "D"                              ;discover
  368.       break                                       ;
  369.    dcase
  370.     goto GetCardNum
  371.   endswitch                                       ;
  372.  
  373.   if Option != CardType
  374.     goto GetCardNum
  375.   endif
  376.  
  377. ;---------------------------------------------------------------------------
  378. GetCardDate:
  379.   gosub   Header
  380.   display  5 5 "Enter the expiration date"
  381.   gosub   Footer
  382.   set     CardDate                              ;set var to null
  383.   setmask CardDate "99/99"                      ;set var mask
  384.   accept   8 5 "@X0EExpire Date:@X03 " CardDate ;get caller input
  385.   trim    CardDate
  386.   if CardDate == "/"
  387.     goto GetCardNum
  388.   endif
  389.  
  390.   goto JobDone
  391.  
  392.  
  393. ;---------------------------------------------------------------------------
  394. SubScribeFail:
  395.   set   wasAbort 'Y'
  396.   set   msgSUBJ "Subscription Aborted"
  397.   set   msgTITL "Subscription Aborted"
  398.   gosub DoMsg
  399.   goto  EndIt
  400.  
  401. ;---------------------------------------------------------------------------
  402. pwFail:
  403.   set   wasAbort 'Y'
  404.   set   msgSUBJ "Password entry failed"
  405.   set   msgTITL "Password entry failed"
  406.   gosub DoMsg
  407.   goto  EndIt
  408.  
  409. ;---------------------------------------------------------------------------
  410. ; goofball caller entered bad #.
  411. ; yell at 'em
  412. ;---------------------------------------------------------------------------
  413. InvalidPhoneNum:
  414.   text  ""
  415.   set     AnyKey                                  ;set var to null
  416.   setmask AnyKey "*"                              ;set entry mask
  417.   prompt "Invalid phone number. Press <ENTER> to continue." AnyKey
  418.   goto    CallBack
  419. ;---------------------------------------------------------------------------
  420. ; long distance not allowed
  421. ;---------------------------------------------------------------------------
  422. NoLD:
  423.   gosub   Header
  424.   display  5 5 "@X0E" xphone "@X03 appears to be a long distance phone number."
  425.   display  6 5 "Long distance callback is not supported."
  426.   display  7 5 ""
  427.   display  8 5 "1...Enter different phone number."
  428.   display  9 5 "2...Leave comment to Sysop and hangup".
  429.   display 10 5 "3...Hangup now".
  430.   gosub   Footer
  431.   set     Option                            ;set var to null
  432.   setmask Option "<123>"                    ;set entry mask
  433.   accept  13 5 "Option : " Option           ;get caller input
  434.   switch  Option                            ;test caller entry
  435.     case  "1"                               ;
  436.       goto  CallBack
  437.     case  "2"                               ;
  438.       goto Cmnt2Sysop
  439.     case  "3"                               ;
  440.       goto  NoLDmsg
  441.   endswitch                                 ;
  442.   goto NoLD
  443. ;---------------------------------------------------------------------------
  444. ;---------------------------------------------------------------------------
  445. Cmnt2Sysop:
  446.   esc_chk ON                          ;turn escape checking on
  447.   esc_to  CmntMsg                     ;set esc latch
  448.   gosub   Header
  449.   display  5 5 ""
  450.   display  6 5 "Enter up to 3 lines of text. Press <ESC> when done."
  451.   display  7 5 ""
  452.   gosub   Footer
  453.   if @graphics@ == 0
  454.     prompt  "1:" Cmnt1
  455.     prompt  "2:" Cmnt2
  456.     prompt  "3:" Cmnt3
  457.     goto Cmnt2Sysop
  458.   else
  459.     FORMAT MsgFmt
  460.       Cmnt1
  461.       Cmnt2
  462.       Cmnt3
  463.     FORMAT
  464.     getmsg MsgFmt 13 12 3 55
  465.   endif
  466.  
  467. CmntMsg:
  468.   esc_chk OFF                         ;turn escape checking off
  469.   esc_to                              ;reset esc latch
  470. ;  if @firstu@ != "SYSOP"
  471.     MSG
  472.       "SYSOP"                 ;to
  473.       "SYSOP"                 ;from
  474.       "LD Comment"            ;subject
  475.       "Comment"               ;security
  476.       "Main Board"            ;conf
  477.       "Long distance comment" ;1st line of msg
  478.       "Node: " @node@ "  Baud Rate: " @bps@ "   " @sysdate@ "  " @systime@
  479.       "-------------------------------------------------------"
  480.       "   Name: " @user@ "    Age: " Age
  481.       "City,ST: " CitySt
  482.       "  Phone: " Phone
  483.       "  Occup: " Occup
  484.       "    How: " How
  485.       "-------------------------------------------------------"
  486.       "1:" Cmnt1
  487.       "2:" Cmnt2
  488.       "3:" Cmnt3
  489.     MSG
  490. ;  endif
  491.   set   wasAbort 'Y'
  492.   goto  EndIt
  493. ;---------------------------------------------------------------------------
  494. ;---------------------------------------------------------------------------
  495. NewCaller:
  496.   display_file ssDefDir INFO.TXT            ;display this file
  497.   clearcrt
  498.   indent   5
  499.   display  1 5  ""
  500.   display  2 5  "@X09┌───────────────────────────────────────────────────────────────────┐"
  501.   display  3 5  "@X09│                 @X0B**** QExchange Bulletin Board ****               @X09 │"
  502.   display  4 5  "@X09├───────────────────────────────────────────────────────────────────┤"
  503.   display  5 5  "@X09│                                                                   │"
  504.   display  6 5  "@X09│ @X0BYou are in the new caller login section. After completing the    @X09 │"
  505.   display  7 5  "@X09│ @X0Bquestions below, you will be returned to the main bulletin board.@X09 │"
  506.   display  8 5  "@X09│                                                                   │"
  507.   display  9 5  "@X09│ @X0BThis is a one-time procedure. Estimated time to complete this    @X09 │"
  508.   display 10 5  "@X09│ @X0Bquestionnaire is 2 to 4 minutes.                                 @X09 │"
  509.   display 11 5  "@X09│                                                                   │"
  510.   display 12 5  "@X09├───────────────────────────────────────────────────────────────────┤"
  511.   display 13 5  "@X09│                                                                   │"
  512.   display 14 5  "@X09│   @X0FNOTE: @X07If you do not wish to complete the questionnaire at      @X09 │"
  513.   display 15 5  "@X09│         @X07this time, you may press <ESC> at the 'Name' field       @X09 │"
  514.   display 16 5  "@X09│         @X07prompt.                                                  @X09 │"
  515.   display 17 5  "@X09│                                                                   │"
  516.   display 18 5  "@X09└───────────────────────────────────────────────────────────────────┘"
  517.   display 19 5  ""
  518.   display 20 5  ""
  519.   indent  0
  520.   if @graphics@ == '1'
  521.     force_enter
  522.   endif
  523.   gosub GetData
  524.   return
  525. ;---------------------------------------------------------------------------
  526. ; get caller data
  527. ;---------------------------------------------------------------------------
  528. GetData:
  529. ; color bright cyan black             ;set attr
  530.   color cyan black
  531.   gosub DspDataTitles
  532.   esc_chk ON                          ;turn escape checking on
  533.   esc_to  AbortJob                    ;set esc latch
  534.   accept  5 5  "            Name@X08: @X0B" Name
  535.   esc_to                              ;reset esc latch
  536.   esc_chk OFF                         ;turn escape checking off
  537.   ;
  538.   ; prompt for rest of data fields
  539.   ;
  540.   accept   6 5  "         Company@X08: @X0B" Company
  541.   accept   7 5  "         Address@X08: @X0B" Addr
  542.   accept   8 5  "     City, State@X08: @X0B" CitySt
  543.   accept   9 5  "             Zip@X08: @X0B" Zip
  544.   accept  10 5  "         Country@X08: @X0B" Country
  545.   accept  11 5  "    Phone Number@X08: @X0B" Phone
  546.   accept  12 5  " Fax/Data Number@X08: @X0B" Fax
  547.   accept  13 5  "        Your Age@X08: @X0B" Age
  548.   if @graphics@ == '0'
  549.     newline
  550.   endif
  551.   accept  15 5 "                Your occupation@X08: @X0B" Occup
  552.   accept  16 5 " How did you hear of QExchange?@X08: @X0B" How
  553.   accept  17 5 "    What type of PC do you use?@X08: @X0B" PCType
  554.   accept  18 5 "    PC NetWork (if you use one)@X08: @X0B" NetWork
  555.   color   bright cyan black             ;set attr
  556.   gosub   Listit
  557.   if wasnew == Y
  558.     curDate 5 / cdate
  559.     curTime 5   ctime
  560.     set AddDate cdate
  561.     set AddTime ctime
  562.   endif
  563.   write   1 HistFmt
  564.   gosub   LogData
  565.   return
  566. ;---------------------------------------------------------------------------
  567. ; display data entry field titles if in graphics mode
  568. ;---------------------------------------------------------------------------
  569. DspDataTitles:
  570.   if @graphics@ == '1'
  571.     clearcrt
  572.     display  1 1 "@X0B" topl mid topr "@X07"
  573.     display  2 1 "@X0B" up "@X1F                         User Information Profile Entry                      @X0B" up
  574.     display  3 1 "@X0B" botl mid botr "@X07"
  575.  
  576.     display  5 5 "            Name@X08: @X0B"
  577.     display  6 5 "         Company@X08: @X0B"
  578.     display  7 5 "         Address@X08: @X0B"
  579.     display  8 5 "     City, State@X08: @X0B"
  580.     display  9 5 "             Zip@X08: @X0B"
  581.     display 10 5 "         Country@X08: @X0B"
  582.     display 11 5 "    Phone Number@X08: @X0B"
  583.     display 12 5 " Fax/Data Number@X08: @X0B"
  584.     display 13 5 "        Your Age@X08: @X0B"
  585.  
  586.     display 15 5 "                Your occupation@X08: @X0B"
  587.     display 16 5 " How did you hear of QExchange?@X08: @X0B"
  588.     display 17 5 "    What type of PC do you use?@X08: @X0B"
  589.     display 18 5 "    PC NetWork (if you use one)@X08: @X0B"
  590.     display 20 1 "@X0B""hline""@X07"
  591.   endif
  592.   return
  593. ;---------------------------------------------------------------------------
  594. ; list caller data
  595. ;---------------------------------------------------------------------------
  596. Listit:
  597.   clearcrt
  598.   color bright cyan black
  599.   display  1 1 "@X0B" topl mid topr "@X07"
  600.   display  2 1 "@X0B" up "@X1F                            User Information Profile                         @X0B" up
  601.   display  3 1 "@X0B" botl mid botr "@X07"
  602.   color cyan black
  603.   display  4 1 ""
  604.   display  5 1 "                       Name@X08: @X0B" Name
  605.   display  6 1 "                    Company@X08: @X0B" Company
  606.   display  7 1 "                    Address@X08: @X0B" Addr
  607.   display  8 1 "  City, State, Zip, Country@X08: @X0B" CitySt "  " Zip "   " Country
  608.   display  9 1 "               Phone Number@X08: @X0B" Phone "      @X03Fax/Data: " @X0B Fax
  609.   display 10 1 ""
  610.   display 11 1 "                   Your Age@X08: @X0B" Age
  611.   display 12 1 "                 Occupation@X08: @X0B" Occup
  612.   display 13 1 " How you heard of QExchange@X08: @X0B" How
  613.   display 14 1 "                    PC Type@X08: @X0B" PCType
  614.   display 15 1 "PC NetWork (if you use one)@X08: @X0B" NetWork
  615.   return
  616. ;---------------------------------------------------------------------------
  617. ;---------------------------------------------------------------------------
  618. Header:
  619.   clearcrt
  620.   display  1 1 "@X0B" topl mid topr "@X07"
  621.   display  2 1 "@X0B" up "@X1F                              Call Back Procedure                            @X0B" up
  622.   display  3 1 "@X0B" botl mid botr "@X07"
  623.   display  4 1 ""
  624.   indent   5
  625.   return
  626. ;---------------------------------------------------------------------------
  627. ;---------------------------------------------------------------------------
  628. Footer:
  629.   if @graphics@ == '1'
  630.     text    ""
  631.   endif
  632.   text    ""
  633.   indent  0
  634.   text    "@X0B" hline "@X07"
  635.   return
  636. ;---------------------------------------------------------------------------
  637. ;---------------------------------------------------------------------------
  638. LogData:
  639.   if wasnew == N
  640.     return
  641.   endif
  642.   if ssTxtOut == "N"
  643.     return
  644.   endif
  645.   LOG_DATA ssTxtFile
  646.     "---------------------------------------------------------------------"
  647.     "                       Date: "  @sysdate@
  648.     "                       Time: "  @systime@
  649.     "                       Node: "  @node@
  650.     "                       Name: " Name
  651.     "                    Company: " Company
  652.     "                    Address: " Addr
  653.     "  City, State, Zip, Country: " CitySt "  " Zip "   " Country
  654.     "               Phone Number: " Phone "      Fax/Data: " Fax
  655.     ""
  656.     "                        Age: " Age
  657.     "                 Occupation: " Occup
  658.     "          How you heard of?: " How
  659.     "                    PC Type: " PCType
  660.     "PC NetWork (if you use one): " NetWork
  661.   LOG_DATA
  662.   return
  663. ;---------------------------------------------------------------------------
  664. ;---------------------------------------------------------------------------
  665. JobDone:
  666.   write 1 HistFmt                           ;write
  667.   update_user_record                        ;update the user record with new
  668.   gosub Header
  669.   display  5 5 "Logon procedure complete."
  670.   display  6 5 ""
  671.   display  7 5 "Your account on this system has been updated to full access"
  672.   display  8 5 "You may call back at any time to enjoy these privilages."
  673.   display  9 5 ""
  674.   display 10 5 "Thanks for your call!"
  675.   gosub Footer
  676.   color bright white black
  677.   if @security@ < 10
  678.     increase 1 10
  679.   endif
  680.   set   msgSUBJ "New User Called"
  681.   set   msgTITL "New User Logon"
  682.   gosub DoMsg
  683.   goto  EndIt
  684. ;---------------------------------------------------------------------------
  685. ;---------------------------------------------------------------------------
  686. ; callback failed
  687. ;---------------------------------------------------------------------------
  688. CBFail:
  689.   set isLong 'N'
  690.   write 1 HistFmt
  691.   update_user_record            ;update the user record with new
  692.   set   msgSUBJ "CallBack FAILED"
  693.   set   msgTITL "@X8CFAILED@X0B Callback."
  694.   gosub DoMsg
  695.   goto  EndIt
  696. ;---------------------------------------------------------------------------
  697. ;---------------------------------------------------------------------------
  698. ; script was aborted
  699. ;---------------------------------------------------------------------------
  700. AbortJob:
  701.   set   wasAbort 'Y'
  702.   set   msgSUBJ "New User Abort"
  703.   set   msgTITL "@X8CAborted@X0B script."
  704.   gosub DoMsg
  705.   goto  EndIt
  706. ;---------------------------------------------------------------------------
  707. ;---------------------------------------------------------------------------
  708. ; long distance # not allowed
  709. ;---------------------------------------------------------------------------
  710. NoLDmsg:
  711.   set   wasAbort 'Y'
  712.   set   msgSUBJ "Long Distance Num"
  713.   set   msgTITL "Long distance number used in call back script."
  714.   gosub DoMsg
  715.   goto  EndIt
  716. ;---------------------------------------------------------------------------
  717. ;---------------------------------------------------------------------------
  718. DoMsg:
  719. ;  if @firstu@ != "SYSOP"
  720.     MSG
  721.       "SYSOP"                 ;to
  722.       "SYSOP"                 ;from
  723.       msgSUBJ                 ;subject
  724.       "Comment"               ;security
  725.       "Main Board"            ;conf
  726.       msgTITL                 ;1st line of msg
  727.       "Node: " @node@ "  Baud Rate: " @bps@ "   " @sysdate@ "  " @systime@
  728.       "--------------------------------------------------"
  729.       "Callback Verification: " ssCallBack
  730.       "  Allow Long Distance: " ssLongDist
  731.       "             Called #: " Num2Call
  732.       "  Subscription Active: " ssSubScribe
  733.       "            Card Type: " CardType "  Card #:" CardNum "  exp Date:" CardDate
  734.       "--------------------------------------------------"
  735.       "   Name: " @user@ "    Age: " Age
  736.       "City,ST: " CitySt
  737.       "  Phone: " Phone
  738.       "  Occup: " Occup
  739.       "    How: " How
  740.     MSG
  741. ;  endif
  742.   return
  743. ;---------------------------------------------------------------------------
  744. ;---------------------------------------------------------------------------
  745. ; close up files and exit back to pcboard
  746. ;---------------------------------------------------------------------------
  747. EndIt:
  748.   close 1
  749.   if ssCallBack == "Y"
  750.     if isLong == "Y"
  751.       goodbye
  752.       exit
  753.     endif
  754. ;    if wasAbort == "Y"
  755. ;      goodbye
  756. ;      exit
  757. ;    endif
  758.   endif
  759. ;
  760. ;---------------------------------------------------------------------------
  761. ;---------------------------------------------------------------------------
  762. ; If you would like to 'stuff' the keyboard of the caller upon return
  763. ; to pcboard, uncomment the following lines. This example will 'stuff'
  764. ; the word "menu", causing the menu to be displayed when the caller returns
  765. ; to pcboard.
  766. ;
  767. ; You might want to use something like "R Y S" to force the caller to read
  768. ; any new mail you might have left him/her in the door.
  769. ;---------------------------------------------------------------------------
  770. ; if kbStfFile exist                    ;if kb stuff file exist,
  771. ;   dos "del " kbStfFile                ; erase it
  772. ; endif                                 ;
  773. ; log_data   kbStfFile                  ;create kb stuff file
  774. ;   "menu"                              ; dsp menu
  775. ; log_data                              ;end
  776. ;---------------------------------------------------------------------------
  777.   exit
  778.